package cn.panda.edu.controller;

import cn.panda.edu.service.ThesisLayoutService;
import cn.panda.edu.util.Constant;
import cn.panda.edu.util.ResultDataUtil;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/api/student/thesisLayout")
public class StudentThesisLayoutController {
	@Autowired
	private ThesisLayoutService thesisLayoutService;
	@ApiOperation(value="获取论文题目及规范列表" , notes="")
	@ApiImplicitParams({
        @ApiImplicitParam(name = "pageIndex", value = "起始页", required = true, dataType = "Integer",paramType="form"),
	})
	@RequestMapping(value="/queryThesisLayout",method=RequestMethod.POST)
	@ResponseBody
	public Object getList(@RequestParam(defaultValue="1",name="pageIndex")Integer pageIndex) {
		return ResultDataUtil.resData(200, "", thesisLayoutService.listAll(pageIndex, Constant.PAGE_SIZE, null));
	}
}
